import com.sun.beans.editors.EnumEditor;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 123
 * Date: 2023-04-18
 * Time: 19:18
 */
public class j2023_4_18 {


    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String arr = "12345";

        System.out.println("请输入密码");
        for(int i = 0; true ;){
            String arr2 = scan.nextLine();

            if(arr.equals(arr2)){
                System.out.println("密码正确");
            break;
            }
            else{
                System.out.println("密码错误");
                i++;
            }

            if(i == 3){
                System.out.println("连续输入错误3次退出系统");
             break;
            }
        }



    }
    public static void main2(String[] args) {
       int i = 0;
       char[] arr = new char[5];
       for(i = 0 ; i < arr.length ; i ++){
           System.out.print(arr[i]+"  ");
       }
        System.out.println("");
       double[] arr2  = new double[5] ;
       for(i = 0 ;i < arr2.length ; i ++ ){
           System.out.print(arr2[i]+"  ");
       }
        System.out.println("");
       byte[] arr3 = new byte[5];
       for(i = 0 ;i < arr3.length ; i ++ ){
           System.out.print(arr3[i]+"  ");
       }
        System.out.println("");
        String[] arr4 = new String[5];
        for ( i = 0 ; i < arr4.length ; i ++ ){
            System.out.print(arr4[i]+"  ");
        }
        System.out.println("");
       boolean[] arr5 = new boolean[5];
       for( i = 0 ;i < arr5.length ; i ++ ){
           System.out.println(arr5[i]+"  ");
       }


        int[] arr6 = {1,2,3,4};
        for (int x:arr6) {
            System.out.print(x+"  ");
        }


    }

}
